<%@page import="com.joypard.platform.entity.security.resource.Resource"%>
<%@page import="java.util.Iterator"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<jsp:include page="/WEB-INF/jsp/platform/inc/common.jsp" />
<html>
<head>
<head>
<title>stage</title>
<%@ include file="/WEB-INF/jsp/app_resources.jsp"%>
<style type="text/css">
.target {
	background: #eee;
}

.x-tab-strip span.x-tab-strip-text {
	font-size: 12px;
}

.x-btn button {
	font-size: 12px;
}

.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label
	{
	font-size: 12px;
}

.x-small-editor .x-form-field {
	font-size: 12px;
}

.x-border-layout-ct {
	background: #eee;
}

.def-bg {
	background: #eee;
}

.search-gb {
	bodyStyle: "background:#dfe8f6";
}
</style>
<script type="text/javascript">
	window.app = window.top.app;
	window.hasPurview = function(cusCode) {
		return null != app.res.getResByCusCode(cusCode);
	};

	$(function() {
		setTimeout(function() {
			if (document.getElementById("loading-mask") && document.getElementById("loading")) {
				Ext.get('loading').fadeOut({
					remove : true
				});
				Ext.get('loading-mask').fadeOut({
					remove : true
				});
			}
		}, 1);
	});
</script>
</head>
<body marginheight="0" marginwidth="0" rightmargin="0" leftmargin="0" style="margin: 0px; padding: 0px; width: 100%;">
	<div id="position">
		<jsp:include page="/WEB-INF/jsp/current_position.jsp" />
	</div>
	<script type="text/javascript">
		var targetHeight = $("body").height() - $("#position").height();
		window.$targetElementId = "target";
		window.$targetHeight = targetHeight;
		window.$targetWidth = $(document.body).width();
	</script>

	<div id="loading-mask" style="z-index: 99999999; top: 0;"></div>
	<div id="loading" style="border: #ccc solid 1px; z-index: 999999990">
		<div class="loading-indicator">正在加载页面,请您稍后......</div>
	</div>

	<div id="target" class="target">
		<%
			Resource resource = (Resource) request
					.getAttribute("requestResource");
			resource = (Resource) request.getAttribute("requestResource");
			String url = resource.getResUrl().replaceAll("/platform", "");
			pageContext.setAttribute("url", url);
			pageContext.setAttribute("resource", resource);
		%>
		<jsp:include page="${url }"></jsp:include>
	</div>
	<script type="text/javascript">
		// 		$(function() {
		// 			Ext.Ajax.request({
		// 				url : "${resource.resUrl}",
		// 				success : function(response) {
		// 					Ext.get("target").update(response.responseText, true);
		// 				}
		// 			});
		// 		});

		// TODO : IFRAME
	</script>
</body>
</html>

